<div class="panel-group" id="log-accordion">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h4 class="panel-title">
        <a class="accordion-toggle" data-toggle="collapse" href="#log-list">
          点击查看 <i class="fa fa-chevron-up fa-fw"></i>
        </a>
      </h4>
    </div>
    <ul class="list-group panel-collapse collapse" id="log-list">
      {% if field_value %}
        {% for log in field_value %}
          <li class="list-group-item">
            {% if log.action == "新建" %}
              {{ "[%s]: 用户%s创建了本<i>%s</i>" |safe %(log.create_time, log.actor, log.obj_class) }}
            {% else %}
              {{ "[%s]: 用户%s对<i>%s</i>(%s)执行了[%s]操作" |safe %( log.create_time, log.actor, log.obj_class, log.obj, log.action) }}
            {% endif %}
            {% if log.message|length > 0 %}
              {{ log.message }}
            {% endif %}
          </li>
        {% endfor %}
      {% else %}
        <li class="text-danger list-group-item">没有日志</li>
      {% endif %}
    </ul>
  </div>
</div>
